package com.matrix.codeGeneration.core;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.matrix.codeGeneration.model.OutDataSource;

/**
 * @author 姜友瑶
 * @e-mail:<935090232@qq.com>
 * @date 2015-10-23
 * @description 代码生成器
 */
public class MainClass {

	public static void main(String[] args) {

		ApplicationContext context = new ClassPathXmlApplicationContext("config/code-generation.xml");
		// 根据需要注入自己的数据源
		OutDataSource outDataSource = (OutDataSource) context.getBean("outDataSource");
		// 生成代码文件
		Generator.buildCodeFiles(outDataSource);

	}

}